Skip to content

docs(writing-plans): add context gathering guidelines#935

Open
StrangeXin wants to merge 1 commit intoobra:mainfrom
StrangeXin:fix/writing-plans-context-gathering
Open

docs(writing-plans): add context gathering guidelines#935
StrangeXin wants to merge 1 commit intoobra:mainfrom
StrangeXin:fix/writing-plans-context-gathering

Conversation

@StrangeXin
Copy link
Copy Markdown

Problem

The writing-plans skill tells the agent to "document everything they need to know" and "map out which files will be created or modified," but provides no guidance on how much context to gather before writing the plan.

In practice, this causes agents to over-explore: launching multiple broad codebase exploration agents (e.g., full backend + frontend scans consuming 130k+ tokens), reading dozens of unrelated files, and listing entire directories — all before writing a single line of the plan. This wastes significant context window and delays plan creation.

Solution

Add a "Context Gathering" section before "File Structure" with explicit boundaries:

  • Always read the spec/requirements document
  • Read only files directly referenced by the spec or that need modification
  • Don't launch broad exploration agents, read unrelated modules, or list entire directories
  • Rule of thumb: if you need more than ~5 targeted file reads, you're over-gathering

Key insight

The skill's job is to write a plan that documents what the implementer needs — it doesn't require the planner to have read the entire codebase first. Targeted reads of the spec + directly relevant files provide sufficient context for accurate plan writing.

🤖 Generated with Claude Code

…-exploration

Without explicit boundaries, agents tend to launch broad codebase exploration
(multiple Explore agents, reading dozens of files) before writing a plan. This
wastes context window and delays plan writing. Add a "Context Gathering" section
with clear guidance: read the spec + only directly relevant files, avoid broad
exploration, cap at ~5 targeted reads.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant